{% autoescape false %}

{% for index, field in form.fields %}
{% set input = attribute(field, "input@") %}
{% if input is null or input == true %}
{% set value = form.value(field.name ?? index) %}
{{ field.name ?? index }}: {{ string((value is iterable ? value|json_encode : value)|nl2br)|replace({"\n":' ', "\r":' '}) }}
{% endif %}
{% endfor %}

{% endautoescape %}